mui.init({
	swipeup:true,
});
window.addEventListener("scroll",function(e){
	//整个页面上滑的时候
   if(window.pageYOffset>0){
       mui('header-filter')[0].style.display="none";
       mui('header')[0].style.display="none";
       mui('.header')[0].style.display="none";
       mui('.backtop')[0].style.display="flex";
   }

});
var mo=function(e){e.preventDefault();};
/***禁止滑动***/
function stop(){
        document.body.style.overflow='hidden';        
        document.addEventListener("touchmove",mo,false);//禁止页面滑动
}

/***取消滑动限制***/
function move(){
        document.body.style.overflow='';//出现滚动条
        document.removeEventListener("touchmove",mo,false);        
}

   //返回顶部让header出现
var backtop=mui('.backtop')[0];
backtop.addEventListener('tap',function(){
	setTimeout(function(){
	   mui('header-filter')[0].style.display="block";
       mui('header')[0].style.display="block";
       mui('.header')[0].style.display="block";
       mui('.backtop')[0].style.display="none";
	},10)
})
//分享的实现
mui('.icon-more')[0].addEventListener('tap',function(){
	mui('div[lll=forward]')[0].classList.add('active');
	//禁止滚动
    stop();
})
mui('.forward_cancel')[0].addEventListener('tap',function(){
    mui('div[lll=forward]')[0].classList.remove('active');
    move();
})
//黑名单实现
mui('.forward_DEL')[0].addEventListener('tap',function(){
	mui('div[lll=forward]')[0].classList.remove('active');
	mui('div[showbl=blacklistBox]')[0].classList.add('active');
	//禁止滚动
    stop();
})
mui('.backlistbox-cancel')[0].addEventListener('tap',function(){
	mui('div[showbl=blacklistBox]')[0].classList.remove('active');
	//禁止滚动
    move();
})
//文章排序的出现
var sortingflag=true;
mui('body').on('tap',".sorting",function(event){
	if(sortingflag){
			mui('.sortingbox')[0].style.display="block";
			sortingflag=false;
	}else{
			mui('.sortingbox')[0].style.display="none";
			sortingflag=true;
	}

})
